<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <title>边距合并和负值</title>
  <style>
    body {
      padding: 100px;
    }

    article {
      border: solid 3px #ddd;
      width: 300px;
      padding: 50px 0;
    }

    h2 {
      border: solid 1px red;
      margin-bottom: 60px;
      margin-top: 30px;
    }

    h3 {
      border: solid 1px red;
      margin-bottom: 30px;
      margin-top: 30px;
    }

    div {
      border: solid 3px red;
      margin-left: -50px;
      margin-right: -50px;
      text-align: center;
    }
    ul>li {
      border: solid 1px red;
      margin-top: 20px;
      margin-bottom: 30px;
    }
  </style>
</head>

<body>
  <h2>houdunren.com</h2>
  <h2>houdunren.com</h2>
  <h3>houdunren.com</h3>
  <ul>
    <li>houdunren.com</li>
    <li>houdunren.com</li>
    <li>houdunren.com</li>
  </ul>
  <article>
    <div>houdunren.com</div>
  </article>
</body>

</html>